﻿using System;

namespace Shuba.Model
{
    [Serializable]
    public class ClusterTargetInfo
    {
        public ClusterTargetInfo()
        {
        }

        public ClusterTargetInfo(string ClusterID, string TargetYear, Int64 TargetAmount, Int32 Noa, Int64 TargetAmountReal, Int32 NoaReal, string EntryBy, DateTime EntryDate, string UpdateBy, DateTime UpdateDate)
        {
            this._ClusterID = ClusterID;
            this.TargetYear = TargetYear;
            this.TargetAmount = TargetAmount;
            this.Noa = Noa;
            this.TargetAmountReal = TargetAmountReal;
            this.NoaReal = NoaReal;
            this.EntryBy = EntryBy;
            this._EntryDate = EntryDate;
            this.UpdateBy = UpdateBy;
            this._UpdateDate = UpdateDate;
        }

        public ClusterTargetInfo(string ClusterID, string ClusterName, string TargetYear, Int64 TargetAmount, Int32 Noa, Int64 TargetAmountReal, Int32 NoaReal, string EntryBy, DateTime EntryDate, string UpdateBy, DateTime UpdateDate)
        {
            this._ClusterID = ClusterID;
            this.ClusterName = ClusterName;
            this.TargetYear = TargetYear;
            this.TargetAmount = TargetAmount;
            this.Noa = Noa;
            this.TargetAmountReal = TargetAmountReal;
            this.NoaReal = NoaReal;
            this.EntryBy = EntryBy;
            this._EntryDate = EntryDate;
            this.UpdateBy = UpdateBy;
            this._UpdateDate = UpdateDate;
        }

        public ClusterTargetInfo(string ClusterID, string ClusterName, string TargetYear, Int64 TargetAmount, Int32 Noa, Int64 TargetAmountReal, Int32 NoaReal, string EntryBy, DateTime EntryDate, string UpdateBy, DateTime UpdateDate, string ActType)
        {
            this._ClusterID = ClusterID;
            this.ClusterName = ClusterName;
            this.TargetYear = TargetYear;
            this.TargetAmount = TargetAmount;
            this.Noa = Noa;
            this.TargetAmountReal = TargetAmountReal;
            this.NoaReal = NoaReal;
            this.EntryBy = EntryBy;
            this._EntryDate = EntryDate;
            this.UpdateBy = UpdateBy;
            this._UpdateDate = UpdateDate;
            this.ActType = ActType;
        }

        public ClusterTargetInfo(Int64 TargetAmount, Int32 Noa, Int64 TargetAmountReal, Int32 NoaReal)
        {
            this.TargetAmount = TargetAmount;
            this.Noa = Noa;
            this.TargetAmountReal = TargetAmountReal;
            this.NoaReal = NoaReal;
        }

        private string _ClusterID = "";
        public string ClusterID
        {
            get { return _ClusterID; }
            set { _ClusterID = value; }
        }
        public string TargetYear { get; set; }
        public string ClusterName { get; set; }
        public Int64 TargetAmount { get; set; }
        public Int32 Noa { get; set; }
        public Int64 TargetAmountReal { get; set; }
        public Int32 NoaReal { get; set; }
        
        public string EntryBy { get; set; }
        private DateTime _EntryDate = DateTime.Now;
        public DateTime EntryDate
        {
            get { return _EntryDate; }
            set { _EntryDate = value; }
        }
        public string UpdateBy { get; set; }

        private DateTime _UpdateDate = DateTime.Now;
        public DateTime UpdateDate
        {
            get { return _UpdateDate; }
            set { _UpdateDate = value; }
        }
        public string ActType { get; set; }
        public override string ToString()
        {
            return _ClusterID + " - " + ClusterName + " - " + TargetYear + " - " + TargetAmount.ToString() + " - " + Noa.ToString() + " - " + EntryBy + " - " + _EntryDate.ToString("yyyy MMM dd hh:mm:ss") + " - " + UpdateBy + " - " + _UpdateDate.ToString("yyyy MMM dd hh:mm:ss");
        }

        public string ToString4Audit()
        {
            return "ID: " + _ClusterID + ", NAME: " + ClusterName + ", TARGET_YEAR: " + TargetYear + ", TARGET_AMOUNT: " + TargetAmount.ToString() + ", NOA: " + Noa.ToString() + ", ENTRY_BY: " + EntryBy + ", ENTRY_DT: " + _EntryDate.ToString("yyyy MMM dd hh:mm:ss") + ", UPDATE_BY: " + UpdateBy + ", UPDATE_DT: " + _UpdateDate.ToString("yyyy MMM dd hh:mm:ss");
        }

    }
}
